import request from '@/utils/request'



/**
 * 物业项目dashboard：基本信息卡片
 * @param  projectCode  项目编码
 */
 const propertyProjectInfoApi = ({ projectCode }) => {
	const data = {
		projectCode,
	}
	return request({
		url: 'portal-server/v1/api/cockpitArrearsProperty/propertyProjectInfo',
		method: 'post',
		data: data
	})
};

/**
 * 物业项目dashboard：预算对标卡片
 * @param  projectCode  项目编码
 * @param  timeType  时间类型 「累计 or 全年」
 */
 const propertyProjectCollectDetailApi = ({ projectCode, timeType }) => {
	const data = {
		projectCode,
		timeType,
	}
	return request({
		url: 'portal-server/v1/api/cockpitArrearsProperty/propertyProjectCollectDetail',
		method: 'post',
		data: data
	})
};
// 获取物业能耗分析数据
 const energyCostsCardDataApi = (projectCode) => {
	return request({
		url: `/portal-server/v1/api/wyReport/wyEnergyModuleCardList?projectCode=${projectCode}`,
		method: 'get',
	})
};
 const energyCostsCardEchartApi = (projectCode) => {
	return request({
		url: `/portal-server/v1/api/wyReport/wyEnergyModuleChartList?projectCode=${projectCode}`,
		method: 'get',
	})
};

// 获取物业欠款分析数据
 const debtAnalyseCardApi = (data) => {
	return request({
		url: `/portal-server/v1/api/propertyDebt/card`,
		method: 'post',
		data
	})
};



export default {
	propertyProjectInfoApi,
	propertyProjectCollectDetailApi,
	energyCostsCardDataApi,
	energyCostsCardEchartApi,
	debtAnalyseCardApi,
}
